#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>

void* run_thread(void* args)
{
  char* msg = (char*)args;
  while(1)
  {
    printf("im a new pthread my tid is: %lu\n" , pthread_self());
    sleep(3);
    int* p = NULL;
    *p = 20;
  }
}


int main()
{
  pthread_t tid;
  pthread_create(&tid ,NULL ,run_thread ,(void*)"thread 1");
  while(1)
  {
    printf("im main thread i create the new pid is：%lu\n", tid);
    sleep(1);
  }
  return 0;
}
